﻿<local:DocumentBase x:Class="WPFExcelReport.MVTVV06"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                   
                    xmlns:db="clr-namespace:MVTVV06" 
                    >
    <local:DocumentBase.Resources>
        <db:SETVV  x:Key="SETUI" />
        <CollectionViewSource   x:Key="vwKUNDADR" Source="{Binding Path=KUNDADR,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwKDSTAMM" Source="{Binding Path=KDSTAMM,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVVLIEF" Source="{Binding Path=VVLIEF,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwWBBST" Source="{Binding Path=WBBST,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVVPACK" Source="{Binding Path=VVPACK,Source={StaticResource SETUI}}" />
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2"  >            
            <WrapPanel Name="ZoneOrder">
                <TextBlock FontSize="18"  Height="Auto" Width="Auto">订单号:</TextBlock>
                <TextBox   FontSize="18" Name="txtVKPAUFKRS"  Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" 
                           Background="Pink" CharacterCasing="Upper" MaxLength="2" Panel.ZIndex="0"/>
                <TextBox   FontSize="18" Name="txtVKPAUFLFD"  Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Green" Panel.ZIndex="1"
                           KeyUp = "txtVKPAUFLFD_KeyUp" CharacterCasing="Upper" MaxLength="6"/>
                <TextBlock FontSize="18" Height="Auto"  Width="Auto"  Text="发货单" Margin="10,0,0,0" />
                <TextBlock FontSize="18" Height="Auto"  Background="AliceBlue" Width="94" Name="txtVVLIEFSCH" Margin="10,0,0,0" Text="{Binding Path=VVLIEFSCH,Source={StaticResource ResourceKey=vwVVLIEF}}" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetVVLIEF" Click="btnGetVVLIEF_Click" Panel.ZIndex="2" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button   Height="30" Margin="20,0,0,0"  Name="btnPrint" Width="30" Click="btnPrint_Click" Panel.ZIndex="3" >
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <WrapPanel Name="ZoneFTP"
                   Visibility="Hidden">
                <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
                <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
                <TextBlock>FTP站点:</TextBlock>
                <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.1.102</TextBox>
                <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
                <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="sun"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
                <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
                <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="34"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <Button  IsEnabled="False" Visibility="Hidden" Content="EXCEL" Height="30" Margin="90,0,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <Button IsEnabled="False" Visibility="Hidden" Content="浏览数据" Height="30" Margin="0,0,0,0"  Name="btnPrintPreview" Width="90" Click="btnPrintPreview_Click"/>
        </StackPanel>

        <DataGrid Grid.Row="1" Grid.Column="0"
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgVKKOPF" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="客" Binding="{Binding VKKAUFKRS}" Width="SizeToCells"  MinWidth="20" />
                <DataGridTextColumn Header="单" Binding="{Binding VKKAUFLFD}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="客户" Binding="{Binding VKKKUNDNR}" Width="SizeToCells"  MinWidth="30" />
                <DataGridTextColumn Header="客户简称" Binding="{Binding VKKBESTSB}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="客户区" Binding="{Binding VKKVB}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="客户PO" Binding="{Binding VKKBESTNR}" Width="SizeToCells"  MinWidth="50"/>
                <DataGridTextColumn Header="开单日期" Binding="{Binding VKKNEUDAT}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="货币" Binding="{Binding VKKWAEHRSL}" Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="系数" Binding="{Binding VKKKURS}" Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="目地港" Binding="{Binding VKKZUSATZ}" Width="SizeToCells"  MinWidth="30"/>
            </DataGrid.Columns>
        </DataGrid  >
        <DataGrid Grid.Row="2" Grid.Column="0"
            CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
                        AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" 
                               Margin="0,2,0,0" 
                               x:Name="dlgVKPOS" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="销" Binding="{Binding VKPAUFKRS}" Width="SizeToCells"  MinWidth="30" />
                <DataGridTextColumn Header="售" Binding="{Binding VKPAUFLFD}" Width="SizeToCells"  MinWidth="40" />
                <DataGridTextColumn Header="单" Binding="{Binding VKPAUFPOS}" Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="品种" Binding="{Binding VKPART}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="颜色" Binding="{Binding VKPFARBE}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="数量" Binding="{Binding MTR}" Width="SizeToCells"  MinWidth="40"/>
                <DataGridTextColumn Header="单位" Binding="{Binding VKPMEEH}" Width="SizeToCells"  MinWidth="40"/>
            </DataGrid.Columns>
        </DataGrid  >
        <DataGrid  Grid.Row="1" Grid.Column="1"
                AutoGenerateColumns="False" 
                HorizontalAlignment="Stretch" 
                VerticalAlignment="Stretch"
                SelectionChanged="dlgVVLIEF_SelectionChanged"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwVVLIEF}}" 
                Margin="0,0,0,0" 
                x:Name="dlgVVLIEF" 
                Height="Auto" 
                MinHeight="100">
            <DataGrid.Columns>
                <DataGridTextColumn Header="发货单号" Binding="{Binding VVLIEFSCH}"  Width="SizeToCells"  MinWidth="40" />
                <DataGridTextColumn Header="发货单状态" Binding="{Binding VVSTATUS}"  Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="运输方式" Binding="{Binding VVVERSART}"  Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="承运人" Binding="{Binding VVSPED}"  Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="发货日期" Binding="{Binding VVVERSDAT}"  Width="SizeToCells"  MinWidth="30"/>
                <DataGridTextColumn Header="发货单建议号" Binding="{Binding VVAVISNR}"  Width="SizeToCells"  MinWidth="40"/>
            </DataGrid.Columns>
        </DataGrid  >
        <DataGrid  Grid.Row="2" Grid.Column="1"
                AutoGenerateColumns="False" 
                HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding}" 
                               Margin="0,0,0,0" 
                               x:Name="listWBBST" Height="Auto" MinHeight="300">
            <DataGrid.Columns>
                <DataGridTextColumn Header="包号" Binding="{Binding WBBBEM}"/>
                <DataGridTextColumn Header="布卷号" Binding="{Binding WBBSTKNR}"/>
                <DataGridTextColumn Header="数量" Binding="{Binding WBBISTKLG}"/>
                <DataGridTextColumn Header="重量" Binding="{Binding WBBIGEW}"/>
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</local:DocumentBase>